Platform Explorer / Nuxeo Platform 2021.7

Bundle org.nuxeo.elasticsearch.seqgen

In bundle group org.nuxeo.elasticsearch

Documentation

  • README.md

    nuxeo-elasticsearch-seqgen

    About

    This project provides a sequence number generator based on Elasticsearch by contributing to the sequencers extension point of the UIDGeneratorService.

    Why this module?

    The Elasticsearch backend for the Nuxeo Audit service ESAuditBackend needs to generate sequence ids.

    It seems bad to use a SQL database just for handling these sequences: that's why this ES based implementation does exist.

    How it works

    The implementation is based on the Blog post "ElasticSearch::Sequence - a blazing fast ticket server".

    Basically, it uses an index with a single entry where the revision number is used as current value of the sequence.

    Using it

    UIDGeneratorService service = Framework.getService(UIDGeneratorService.class);
    UIDSequencer seq = service.getSequencer();
    // The previous call assumes the `uidgen` contribution is the default one, else you need to specify the sequencer name explicitely:
    // UIDSequencer seq = service.getSequencer("uidgen");
    int number = seq.getNext(key);
    

    Building

    To build and run the tests, simply run the Maven build:

    mvn clean install
    
  • Parent Documentation: README.md

    nuxeo-elasticsearch

    About

    This project aims at providing Nuxeo bundles to integrate Elasticsearch with the Nuxeo Platform.

    The idea is to index/query Nuxeo Documents to/from Elasticsearch.

    Building

    To build and run the tests, simply start the Maven build:

    mvn clean install
    

    Running tests

    Using the embedded Elasticsearch

    With the default RestClient:

    mvn -nsu test
    # -Dnuxeo.test.elasticsearch.client=RestClient is set by default
    

    Or with the TransportClient

    mvn -nsu test -Dnuxeo.test.elasticsearch.client=TransportClient
    

    Using an external Elasticsearch

    1. Start an Elasticsearch using docker:
    docker run -p 9400:9200 -p 9600:9300 docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.3
    

    2.a Run the test with RestClient:

    mvn -nsu test -Dnuxeo.test.elasticsearch.addressList=http://localhost:9400
    

    2.b Or run the test with TransportClient:

    mvn -nsu test -Dnuxeo.test.elasticsearch.client=TransportClient -Dnuxeo.test.elasticsearch.clusterName=docker-cluster -Dnuxeo.test.elasticsearch.addressList=localhost:9600
    

    Links

    • Administration: http://doc.nuxeo.com/x/UBY5AQ
    • Configuring mapping: http://doc.nuxeo.com/x/WxI5AQ
    • Overview: http://doc.nuxeo.com/x/iYElAQ
    • Open jira tikets

Resolution Order

528
The resolution order represents the order in which this bundle's single component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in the component declaration, to make sure it is resolved after another component. It will also impact the order in which contributions are registered on their target extension point (see "Registration Order" on contributions).

Components

Maven Artifact

Filenuxeo-elasticsearch-seqgen-2021.7.15.jar
Group Idorg.nuxeo.elasticsearch
Artifact Idnuxeo-elasticsearch-seqgen
Version2021.7.15

Manifest

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: root
Build-Jdk: 11.0.12
Bundle-ManifestVersion: 1
Bundle-Version: 1.0.0
Bundle-Name: ElasticSearch Sequence Generator
Bundle-SymbolicName: org.nuxeo.elasticsearch.seqgen;singleton:=true
Nuxeo-Component: OSGI-INF/elasticsearch-uidgen-sequencer-contrib.xml

Exports

Charts

    Raw Data: Json Contribution Stats

    Contributions by Code Type

    Loading data

    Contributions by Target Extension Point

    Loading data

    Contributions by Studio Source

    Loading data